package modelLayer;

public class Block {

	private int number;
	private TeachingBlock tb;
	private Schedule sch;
	
	public Block(int number) {
		
		this.setNumber(number);
		
	}
	
	public boolean setTeachingBlock(TeachingBlock tb) {
		
		if (tb != null) {
			this.tb = tb;
			return true;
		}
		else {
			return false;
		}
		
	}

	/**
	 * @return the number
	 */
	public int getNumber() {
		return number;
	}

	/**
	 * @param number the number to set
	 */
	public void setNumber(int number) {
		this.number = number;
	}

	/**
	 * @return
	 */
	public TeachingBlock getTeachingBlock() {
		return tb;
	}
	
	/**
	 * @return the sch
	 */
	public Schedule getSchedule() {
		return sch;
	}

	/**
	 * @param sch the sch to set
	 */
	public void setSchedule(Schedule sch) {
		this.sch = sch;
	}

	public String toString() {
		
		return String.format(number + " " + tb);
	}
	
}
